package com.uni.controllers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.uni.db.GenericService;
import com.uni.domain.Course;
@Controller
public class CourseController {
	
    @Autowired
	@Qualifier("courseService")
	private GenericService<Course> courseService;

    @RequestMapping("/courseList.htm")
	public ModelMap studentListHandler() {
		return new ModelMap("courses", courseService.listAll());
	}
}
